<template>
  <div>
    <div class="wrap" id="wrap" :style="note">
      <div class="logGet">
        <!-- 头部提示信息 -->
        <div class="logD logDtip">
          <p class="p1">登录</p>
        </div>
        <!-- 输入框 -->
        <div class="lgD">
          <!--<img src="assets/logo.png" width="20" height="20" alt="" />-->
          <i class="iconfont icon-username"></i>
          <input type="text" placeholder="输入用户名" />
        </div>
        <div class="lgD">
          <img src="img/logPwd.png" width="20" height="20" alt="" />
          <input type="password" placeholder="输入用户密码" />
        </div>
        <div class="logC">
          <a><button @click="login">登 录</button></a>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "Login1",
    data() {
      return {
        note: {
          backgroundImage: "url(" + require("../../assets/img/bg.jpg") + ")",
          backgroundSize: "100%",
          backgroundRepeat: "no-repeat",
          backgroundPosition: "center center"
        },
        windowHeight:0
      }
    },
    mounted:function(){
      // this.windowHeight = document.documentElement.clientHeight;
      // this.windowHeight = window.innerHeight;
      // console.log(this.windowHeight);


    },
    methods: {
      login() {
        // 假设登陆成功，则跳转到 home 组件
        // this.$router.push({name:'Home', query:{id: 3}});
        this.$router.replace('/home');
      }
    }
  }
</script>

<style scoped>


  * {
    margin: 0;
    padding: 0;
  }

  #wrap {
    height: 1000px;
    width: 100%;
    background-position: center center;
    position: relative;
    border: 1px solid black;
  }

  #wrap .logGet {
    height: 408px;
    width: 368px;
    position: absolute;
    background-color: #FFFFFF;
    top: 20%;
    right: 25%;
    border: 1px solid black;
  }

  .logC a button {
    width: 100%;
    height: 45px;
    background-color: #ee7700;
    border: none;
    color: white;
    font-size: 18px;
  }

  .logGet .logD.logDtip .p1 {
    display: inline-block;
    font-size: 28px;
    margin-top: 30px;
    width: 86%;
  }

  #wrap .logGet .logD.logDtip {
    width: 86%;
    border-bottom: 1px solid #ee7700;
    margin-bottom: 60px;
    margin-top: 0px;
    margin-right: auto;
    margin-left: auto;
  }

  .logGet .lgD img {
    position: absolute;
    top: 12px;
    left: 8px;
  }
  .logGet .lgD i {
    position: absolute;
    top: 12px;
    left: 8px;
  }

  .logGet .lgD input {
    width: 100%;
    height: 42px;
    text-indent: 2.5rem;
  }

  #wrap .logGet .lgD {
    width: 86%;
    position: relative;
    margin-bottom: 30px;
    margin-top: 30px;
    margin-right: auto;
    margin-left: auto;
  }

  #wrap .logGet .logC {
    width: 86%;
    margin-top: 0px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
  }
</style>
